import {defineStore} from "pinia"

export const userStore = defineStore("user", {
  // 状态
    state: () => ({
        userInfo:{
          name:'张三'
        },
        userInfoChange:false
    }),
    // 修改
    actions: {
      changeUserInfo(userInfo){
        this.userInfo = {...userInfo};
      },
      changeUserInfoChange(){
        this.userInfoChange = !this.userInfoChange
      }
    }
})